home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’96 / Booting Gallery / Booting Gallery (source) / Sources / Sound Source / SoundManager.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-06-22  |  385 b   |  33 lines  |  [TEXT/BROW]

  1. #pragma once
  2.  
  3. #ifndef NEW
  4. #define NEW new
  5. #endif
  6.  
  7. #include <DArray.h>
  8.  
  9. class SoundPlayer;
  10. class SoundManager
  11. {
  12. public:
  13.     SoundManager(OSErr& err);
  14.     ~SoundManager();
  15.     
  16.     void    PlaySound(short id,Boolean loopQ);    
  17.     
  18. protected:
  19.     OSErr    PreloadSounds();
  20.      
  21.     struct Entry
  22.     {
  23.         short        id;
  24.         Handle        sndHandle;
  25.         long        length;
  26.     };
  27.     
  28.     DArray<Entry>        fSoundList;
  29.     SoundPlayer*            fSoundPlayer;
  30.     
  31. };
  32.  
  33.